package cn.laixueit;

public class Demo4 {

    public static void main(String[] args) {
        /*
        Teacher t1 = new Teacher(); // a
        Teacher t2 = new Teacher(); // b.age = 38
        t1.show();//name:张老师,age:28
        t2.show();//name:张老师,age:28
        t2.age=38;
        t1.show();//name:张老师,age:28
        t2.show();//name:张老师,age:38

        // t3 是对象 ，t1 是对象，地址值
        Teacher t3 = t1;
        t3.age = 30;
        t1.show();//name:张老师,age:28x, = 30
        t2.show();//name:张老师,age:38
        t3.show();//name:张老师,age:30*/

      /*  Demo4 demo4 = new Demo4();//0z001

        Teacher t1 = new Teacher();//0x001
        demo4.change(t1);//
        t1.show();


        Teacher t2 = new Teacher();
        demo4.change(t2);
        t2.show();

        Teacher t3 = t1;
        demo4.change(t3);
        t3.show();

        t1.age = 20;
        t2.age = 10;

        System.out.println(t3.age);*/

    }
  /*  public void change(Teacher teacher){
        teacher.age = 18;
    }*/


}
